<?php
    #-------------------------------------------------------------#
	# This file is part of the Kumomado - Virtual Window Platform #
	# for PHP. (c) 2009 Tsai, Min Che <tirme0812@gmail.com>       #
	# Please visit http://www.kumomado.org/ for more information. #
	#                                                             #
	# This software is licensed under the GNU License v3. Please  #
	# view the LICENSE file for the full text of this license.    #
    #-------------------------------------------------------------#

	Kumomado::load('Application.View.KumomadoApplicationView');
	Kumomado::load('Kui.KumomadoUIClient');
	/**
	 * @package applications
	 * @subpackage google
	 * @author Tsai, Min Che
	 */
	class GoogleMapsView extends KumomadoApplicationView {
		public function map() {
			$frame = new KumomadoFrame();
			$window = new KumomadoWindow('google_maps');
			$window->setTitle('Google Maps Demo');
			$window->setSize('60', '60');
			$window->setContent($this->getLayout('googlemaps.xsl'));
			$frame->add($window);
			$this->response($frame->render());
			$this->addScript('googlemaps_init.js');
			$this->output('json');
		}
		public function streetView($lat, $lng) {
			$frame = new KumomadoFrame();
			$window = new KumomadoWindow('google_street_view');
			$window->setTitle('Google Street View Demo');
			$window->setSize('40', '70');
			$window->setPos('700', '150');
			$window->setContent($this->getLayout('googlestreetview.xsl'), array('lat' => $lat, 'lng' => $lng));
			$frame->add($window);
			$this->response($frame->render());
			$this->addScript('googlestreetview_init.js');
			$this->output('json');
		}
	}
?>